/**
 * @description 用户关系api
 * @author 印明帝
 */
import { axios, _formateAxiosData } from './axiosInstance'

/**
 * 关注用户
 * @method userFollow
 * @param {Number} userFollow 关注人的id
 */
async function userFollow (followerId) {
  let result = await axios.post('/follow', {
    followerId
  })
  return _formateAxiosData(result)
}

/**
 * 关注用户
 * @method userUnFollow
 * @param {Number} userUnFollow 关注人的id
 */
async function userUnFollow (followerId) {
  let result = await axios.post('/unFollow', {
    followerId
  })
  return _formateAxiosData(result)
}

/**
 * 获取粉丝列表
 * @method getFans
 * @param {Number} userUnFollow 关注人的id
 */
async function getFans (followerId) {
  let result = await axios.post('/getFans', {
    followerId
  })
  return _formateAxiosData(result)
}
export {
  userFollow,
  userUnFollow,
  getFans
}
